import 'package:flutter/material.dart';
import 'package:flutter_changdian_football/widget/screenutil/custom_screenutil.dart';

/// 比赛记录
class GameRecordWidget extends StatelessWidget {
  const GameRecordWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      child: Column(
        children: [
          Expanded(
            child: ListView.separated(
              physics: const NeverScrollableScrollPhysics(),
              itemCount: 10,
              padding: EdgeInsets.symmetric(vertical: 0.w, horizontal: 15.w),
              separatorBuilder: (context, index) {
                return Container(
                  height: 0.3.w,
                  width: double.infinity,
                  margin: EdgeInsets.symmetric(vertical: 10.w),
                  color: const Color(0xffDDDDDD),
                );
              },
              itemBuilder: (BuildContext context, int index) {
                return SizedBox(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      SizedBox(
                        child: Column(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            SizedBox(
                              child: Text('石子山体育公园', style: TextStyle(fontSize: 14.sp, color: const Color(0xff222222)),),
                            ),
                            SizedBox(height: 8.w,),
                            SizedBox(
                              child: Text('2022-02-29', style: TextStyle(fontSize: 12.sp, color: const Color(0xff999999)),),
                            )
                          ],
                        ),
                      ),

                      Container(
                        decoration: BoxDecoration(
                          color: const Color(0xff499360).withOpacity(0.08),
                          borderRadius: BorderRadius.only(
                            topLeft: Radius.circular(16.r),
                            bottomLeft: Radius.circular(16.r),
                          )
                        ),
                        padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 10.w),
                        child: Text('5人制', style: TextStyle(fontSize: 12.sp, color: const Color(0xff499360)),),
                      )
                    ],
                  ),
                );
              },
            ),
          )
        ],
      ),
    );
  }
}